<template>
  <div>
    <Count/>
    <br>
    <button @click="getadd">点击获取Header组件上的ref</button>
    <MyHeader ref="header"/>
  </div>
</template>

<script>
import Count from './components/Count';
import MyHeader from './components/MyHeader';
export default {
name:'App',
components:{
Count,
MyHeader
},
methods:{
  getadd(){
   
    console.log(this.$refs);
    console.log(this.$refs.header);
  }
}
}
</script>

<style scoped>

</style>